﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <script src="/js/header.js"></script>
    <script src="/lib/date/wdatepicker.js"></script>
</head>
<body>
    <div class="data-wrap case">
        <div class="data-tool clearfix">
            <div class="pull-left form-inline ">
            </div>
            <div class="pull-right">
                <form id="from" enctype="multipart/form-data" method="post">

                    <input type="file" name="file"  style="display:none"/>
                    <input type="button" name="uploadBtn" value="上传" />
                </form>
            </div>
        </div>

        <div class="paging">
        </div>
    </div>
    
    <script type="text/javascript">

        $("input[name='uploadBtn']").click(function () {
            $("input[name='file']").click();
        });

        $("input[name='file']").change(function () {

            var val = $(this).val();

            if (!FlashPay.Util.isNullOrEmptySpance(val)) {

                var file = $(this).get(0);

                var data = new FormData();

                var data = new FormData();
                data.append(file.files[0].name, file.files[0]);

                FlashPay.Util.Ajax({
                    url: '/Payment/UploadFiles',
                    type: 'POST',
                    contentType: false,
                    processData: false,
                    data: new FormData($("#from")[0]),
                    success: function (res) {
                       
                    },
                    error: function (json) {
                        FlashPay.UI.Tip_warning("操作失败！请查看网络，请重试。");
                    }
                });

            }
        });

       
    </script>
</body>
</html>